package com.spddr.pmos.jpa;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import cn.seqdata.jpa.JpaNoGeneratedObject;

@Entity
@Table(name="powergridplan_for_plant")
public class PowerGridPlanForPlant extends JpaCommonAttr{
	private static final long serialVersionUID = 1L;
	
	private String year;
	private Plant plant;
	private Organization org;
	private Date datadate;
	private Double value;
	private TradeWay tradeway;
	@Column(name="datadate")
	public Date getDatadate() {
		return datadate;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "org")
	@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public Organization getOrg() {
		return org;
	}
	public void setOrg(Organization org) {
		this.org = org;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tradeway")
	@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getTradeway() {
		return tradeway;
	}
	public void setTradeway(TradeWay tradeway) {
		this.tradeway = tradeway;
	}
	public void setDatadate(Date datadate) {
		this.datadate = datadate;
	}
	@Column(name="year")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "plant")
	@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public Plant getPlant() {
		return plant;
	}
	public void setPlant(Plant plant) {
		this.plant = plant;
	}
	@Column(name="value")
	public Double getValue() {
		return value;
	}
	public void setValue(Double value) {
		this.value = value;
	}
	
}
